import { defHttp } from "@/utils/http";
export interface DeptVO {
	pageNo?: string;
	pageSize?: string;
}
//查询科室列表
export function deptList() {
	return defHttp.get({ url: "/system/dept/list" });
}
//查询患者基本信息
export function patientInfo(patCardno: string, id: string) {
	const params = {
		patCardno: patCardno,
		id: id
	};
	return defHttp.get({ url: "/his/th-patients/get", params });
}

//查询全部药物列表page
export function medicinePage() {
	return defHttp.get({ url: `/whs/inventory/page` });
}

//患者用药信息page
export function patientsList(params: object) {
	return defHttp.get({ url: "his/treatment-phm/page", params });
}
//创建药品订单
export function treatmentPhm(data: any) {
	return defHttp.post({ url: "/his/treatment-phm/batchCreatePhm", data });
}
//添加患者用药信息
export function addPatMedicine(data: any) {
	return defHttp.post({ url: "/his/treatment-phm/create", data });
}

//删除患者用药信息
export function delPatMedicine(id: any) {
	return defHttp.delete({ url: `/his/treatment-phm/delete?id=` + id });
}
// 5.01 住院信息查询
export function thIpmAdmissions(params: object) {
	return defHttp.get({ url: "/his/TH-ipm-admissions/getByPatientId", params });
}
// 根据患者获得医院最新诊断记录
export function diagnosisGetPat(params: object) {
	return defHttp.post({ url: "/his/TH-diagnosis/getPat", params });
}

// 5.03 查询表格
export function outPatientsPage(params: Recordable) {
	return defHttp.get({ url: "his/opm-outpatients/pagenew", params });
}

//5.04 查询表格
export function medicalRecordStatusPage() {
	return defHttp.get({ url: "his/medical/record/page" });
}

//5.10人物信息回显
export function deathGuyInfo(params: Recordable) {
	return defHttp.get({ url: "his/medical/record/first", params });
}
//5.10 创建患者死亡报告信息
export function addDeathGuy(data: any) {
	return defHttp.post({ url: "/his/pat-death/create", data });
}
//5.10 创建医院诊断记录
export function addDeathGuyDiagnosis(data: any) {
	return defHttp.post({ url: "/his/TH-diagnosis/create", data });
}
//5.10 批量新增患者负责人员
export function addDeathGuyStaffs(data: any[]) {
	return defHttp.post({ url: "/his/pat-staffs/batch/create", data });
}

//5.14.01 查询
export function pageDiagnosisPatients() {
	return defHttp.get({ url: "his/opm-outpatients/pagenew" });
}
//5.14.02 查询
export function pageDischargePatients(params: Recordable) {
	return defHttp.get({ url: "his/TH-ipm-discharges/page", params });
}

//bank301 page
export function pageCustomers() {
	return defHttp.get({ url: "his/customers/page" });
}

//bank302 添加
export function addCustomers(data: any) {
	return defHttp.post({ url: "/his/customers/create", data });
}
